<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>变量</title>
    <script>
        // <!-- 定义变量 -->
        var age = 18;
        // 输出变量
        alert(age);
    </script>

    <!-- Case -->
    <script>
        var myname = '卡卡西';
        var address = '火影';
        var age = 30;
        var gz = 2000;
        // 在console控制台输出
        console.log(myname);
        console.log(address);
        console.log(age);
        console.log(gz);
    </script>


    <script>
        var name = prompt('请输入你的名字');
        alert(name);
    </script>
    <script>
        a2 = 10;
        a1 = 5;
        temp = a2;
        a2 = a1;
        a1 = temp
        console.log(a2, a1);
    </script>
</head>

<body>



</body>

</html>